#include <iostream>
#include <string>
#include "head.h"
using namespace std;

int main()
{

    string num;
    int i;
    BinarySearchTree<T> bst;

    cout<<"init BinarySearchTree(end with -100):    ";
    //insert nodes until numb=-100
    do{
        cin>>num;r4
        if(num=='#')
            break;
        bst.addNode(num);
    }while(1);
    bst.show();


    cout<<endl<<"searching key:   ";
    cin>>num;
    if(bst.search(num))
        cout<<num<<" is in BST."<<endl;
    else
        cout<<num<<" connot be found in BST"<<endl;


    cout<<"delete node:     ";
    cin>>num;
    bst.deleteSingleNode(num);
    bst.show();

}
